#include <iostream>
#include <cstdarg>
#include <stdio.h>
int output(int cont, ...){
    va_list a;

    va_start(a,cont);
    int tmp=0,result=0;
    for(int i=0;i<cont;i++){
        tmp=va_arg(a,int);
        if(tmp>result){
            result=tmp;
        }
    }
    va_end(a);
    return result;

}



int main() {

    //std::cout << "Hello, World!"+output(3,5,2,6) << std::endl;
    printf("%d",output(3,5,9,6));
    while(1);
    return 0;
}